package com.duoduo.common.core.exception;


public class DuoException extends RuntimeException {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -6779853769690456127L;
	
	private ErrorCode errorCode;
	
	public DuoException(String msg) {
		super(msg);
	}
	
	public DuoException(String msg, Throwable e) {
		super(msg, e);
	}
	
	public DuoException(ErrorCode errorCode) {
		super(errorCode.memo);
		this.errorCode = errorCode;
	}
	
	public ErrorCode getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(ErrorCode errorCode) {
		this.errorCode = errorCode;
	}
}
